//
//  MuaAPI.h
//  AppMua5
//
//  Created by duong nguyen on 9/14/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ASIHTTPRequest.h"
#import "ProductObject.h"
#import "DefinePath.h"
#import "JSON.h"

@interface MuaAPI : NSObject{
    ASIHTTPRequest *request;
    SBJsonParser *parser;
    NSMutableArray *productArr;
    NSMutableArray *shopArr;
    
}

@property (nonatomic,retain) ASIHTTPRequest *request;
@property (nonatomic,retain) SBJsonParser *parser;
@property (nonatomic,retain) NSMutableArray *productArr;
@property (nonatomic,retain) NSMutableArray *shopArr;


-(void) grabURLInBackground:(NSString *)urlStr context:(id)context_id;

-(void) getListProductByCategory:(NSInteger)categoryId context:(id)context_id;
-(NSMutableArray *) parseListProductByCategory:(NSString *)response;

-(void) getListProductByShop:(NSInteger)userId shopObject:(ShopObject *)shop context:(id)context_id;
-(NSMutableArray *) parseListProductByShop:(NSString *)response shopObject:(ShopObject *)shop;

-(void) getProductInfo:(NSInteger) userId productId:(NSInteger)productId context:(id)context_id;
-(ProductObject *) parseProductInfo:(NSString *)response ShopObject:(ShopObject *)shop;

@end
